Questions tagged [squirrel]

Squirrel is a high-level object-oriented light-weight scripting language that's designed to be used in real-time requirements applications, like video games.

Official Description:

Squirrel is a high level imperative, object-oriented programming language, designed to be a light-weight scripting language that fits in the size, memory bandwidth, and real-time requirements of applications like video games.

Links:

42 questions
0
votes
1 answer

how to define a variable in a class, and pass it into a function

So im writing a script for the computer game Counter Strike: Global Offensive that changes a players crosshair ingame. the language the games engines uses is called Vscript. Vscript is not very well documented, with the only documentation i could…
user9321739
0
votes
1 answer

Squirrel script - whitespace problem - add a "space" to pass to "echo" command

I have a squirrel plugin which invokes "echo". It is almost correct, but despite having considered various responses on stackoverflow to this problem (and on other unix-related sites) as to how to deal with the "whitespace" or metacharacter issue,…
Spud
  • 73
  • 5
0
votes
1 answer

How do you redirect squirrel "print" command output to a file?

I have a Squirrel plugin as below: fe.add_transition_callback( "removefavourite" ); function removefavourite( ttype, var, ttime ) { switch ( ttype ) { case Transition.ChangedTag: print( fe.game_info( Info.Name ) + "\n" ); system( "echo '" +…
Spud
  • 73
  • 5
0
votes
1 answer

c++ sqrat binding methods though a wrapper

I am attempting to develop a wrapper for my Squirrel VM and SQRat binding The normal way of binding a class is to call: Class myClass(vm,"myClass"); myClass.Func(_SC("Foo"), &MyClass::Foo); Where the class im trying to bind looks like…
Steven Venham
  • 600
  • 1
  • 3
  • 18
0
votes
1 answer

Calculate the distance between the players AIM (xyz, pitch, yaw) and the TARGET Vector(xyz)

We have a target, which is somewhere in the level, and a player that can move around and can aim anywhere. Now we want to calculate the distance between the players AIM and the TARGET. How far off is the players aim from the target? - If this value…
uLLeticaL
  • 3
  • 3
0
votes
1 answer

C++/JNI - Stored Object (jobject) Changes Unexpectedly in Vectors and Arrays, C++ or JNI Issue?

So first some background: I've been working on wrapping a C++ library for Java with the JNI, specifically the Squirrel scripting language. The problem comes when I need to pass a native function to the Squirrel Virtual Machine. Squirrel requires a…
0
votes
1 answer

How to use functions in Squirrel?

I am calling a simple function in my squirrel code, but this does not seem to work as expected. Calling the function with parameters does not affect the original variable. 'counter1' just keeps the same value. In javascript this would work, so why…
Kokodoko
  • 26,167
  • 33
  • 120
  • 197
0
votes
1 answer

Compiling Squirrel Code

I am new to Squirrel based scripting. Whenever I am trying to compile the program using the GCC compiler. I am getting the following error: symbol(s) not found for architecture x86_64 I am trying to compile the code on a 64bit mac. I am new so…
vivek
  • 1
  • 1
0
votes
1 answer

Symbols not found error when linking iPhone app in Xcode

Whenever I try to compile my iPhone app which i am porting I get linking errors. The app uses a scripting language called Squirrel (to read the level files, fine by the SDK, no user input). I have linked all the libraries including libsquirrel.a.…
Firestar
  • 96
  • 4
-1
votes
1 answer

Why do you divide the raw data by 16?

http://datasheets.maximintegrated.com/en/ds/DS18B20.pdf Read page 3, Operation – Measuring Temperature. The following code works to get the temp. I understand all of it except why they divide the number by 16. local raw = (data[1] << 8) |…
helpmeout
  • 19
  • 5
-1
votes
1 answer

How to register a Squirrel class in C++

Hello I'm trying to make use of Squirrel within a C++ application. For this reason I want to register a Squirrel class in C++. Let's take the following class as an example. class Foo { constructor(value) { ::print("constructor…
Zydar
  • 85
  • 1
  • 8
-1
votes
1 answer

How do I bind a function using Sqrat that takes a class as an argumet?

I am binding a class to squirrel and I have come across a problem I don't know how to resolve. The class has a function which takes another class as an argument. When I choose not to bind that specific function it compiles, but when I do it throws…
Semirix
  • 271
  • 3
  • 13
1 2
3